package com.heima.utils.common;

/**
 * @author fkn
 * @description
 * @since 2024-08-12
 */
public class UserThreadLocal {
    private final static ThreadLocal<Integer> USER_THREAD_LOCAL = new ThreadLocal<>();

    public static Integer get(){
        return USER_THREAD_LOCAL.get();
    }

    public static void set(Integer userId){
        USER_THREAD_LOCAL.set(userId);
    }

    public static void remove(){
        USER_THREAD_LOCAL.remove();
    }
}
